using Microsoft.Extensions.Logging;
using Sage.Http.Core;

namespace Sage.Http.Extensions
{
    /// <summary>
    /// 为HttpClient提供扩展方法，增强其功能
    /// </summary>
    public static class HttpClientExtensions
    {
        /// <summary>
        /// 创建HTTP请求管理器
        /// </summary>
        /// <param name="client">HTTP客户端</param>
        /// <param name="logger">日志记录器</param>
        /// <returns>HTTP请求管理器</returns>
        [Obsolete("此方法已过时，请使用HttpExtensions.CreateHttpRequestManager方法")]
        public static HttpRequestManager CreateHttpRequestManager(this HttpClient client, ILogger? logger = null)
        {
            return HttpExtensions.CreateHttpRequestManager(client, logger);
        }
    }
}
